/**
@description main文件

@copyright    Copyright 2022 ONES 复临科技
@version      1.0.0
@link         https://ones.ai
@author       venki.chen <chenwenchao@ones.ai>
@datetime     2022/7/13 16:10
*/

package study

import "fmt"

const (
	Name string = "陈文小超"
)

func init() {
	fmt.Println("--study init--")
}

type Saiyan struct {
	Name  string
	Power int
}

type AddSaiyan struct {
	Name   string
	Power  int
	Father *Saiyan
}

type A struct {
	*B
	Name string
}

type B struct {
	Power int
}

func (a *B) Title() {
	fmt.Println("B's is title()")
}

func NewSaiyan(name string, power int) *Saiyan {
	return &Saiyan{
		Name:  name,
		Power: power,
	}
}

func (s *Saiyan) Super() {
	s.Power += 10000
}

// Super 练习结构体指针-可以称作函数
/*func Super(s *Saiyan) {
	s.Power += 10000
}*/
